/**
 * Copyright ©2012-2018 HopeHaiyang Corporation, All Rights Reserved
 * http://www.wuhanhope.com
 */
package hope.platform.data.server.event.img;

import hope.platform.data.domain.HopeException;
import hope.platform.data.event.ExceptionEvent;
import hope.platform.data.server.event.header.ExceptionListenerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

/**
 * class info
 *
 * @author hujia
 *         Create at 2018/7/24 11:40
 */
@Service
public class ExceptionListenerServiceImg implements ExceptionListenerService {

    @Autowired
    private ApplicationContext applicationContext;

    @Override
    public void publish(HopeException exception) {
        applicationContext.publishEvent(new ExceptionEvent(this,exception));
    }
}
